package billing

import (
	"context"

	"gitee.com/spume/common_service/app/billing/api/billing/v1"
	"gitee.com/spume/common_service/app/billing/internal/service"
)

func (c *ControllerV1) BillingList(ctx context.Context, req *v1.BillingListReq) (res *v1.BillingListRes, err error) {
	res = &v1.BillingListRes{}

	req.Wheres.Set("memberId", req.MemberId)
	req.Wheres.Set("tenantId", req.TenantId)
	req.Wheres.Set("currencyType", req.CurrencyType)

	res.PageLstRes, err = service.Billing().Lst(ctx, req.PageLstReq)

	return
}
